package com.stoken.domain;

import java.io.Serializable;
import java.util.Date;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class AchievementList implements Serializable {
	
	public AchievementList(MemberRegisterInfo baseUsername){
		this.setBaseUsername(baseUsername);
		this.setBringTime(new Date());
	}
	
    public AchievementList(){
		
	}
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY) 
	private long id;
	
	@ManyToOne
	@JoinColumn(name="base_username",nullable=false)
	private MemberRegisterInfo baseUsername;
	
	/**
	 * 领导奖金
	 */
	@Column(columnDefinition="double default 0.00")
	private double leadershipBonus;
	
	/**
	 * 直接推荐奖金
	 */
	@Column(columnDefinition="double default 0.00")
	private double sellBonus;
	
	/**
	 * 消费奖金
	 */
	@Column(columnDefinition="double default 0.00")
	private double consumptionBonus;
	
	/**
	 * 对碰奖金
	 */
	@Column(columnDefinition="double default 0.00")
	private double hillBonus;
	
	/**
	 * 实际领取奖金
	 */
	@Column(columnDefinition="double default 0.00")
	private double actualBonus;
	
	/**
	 * 产生时间
	 */
	@Temporal(TemporalType.DATE)
	@Column(nullable=false)
	private Date bringTime;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public MemberRegisterInfo getBaseUsername() {
		return baseUsername;
	}

	public void setBaseUsername(MemberRegisterInfo baseUsername) {
		this.baseUsername = baseUsername;
	}

	public double getLeadershipBonus() {
		return leadershipBonus;
	}

	public void setLeadershipBonus(double leadershipBonus) {
		this.leadershipBonus = leadershipBonus;
	}

	public double getSellBonus() {
		return sellBonus;
	}

	public void setSellBonus(double sellBonus) {
		this.sellBonus = sellBonus;
	}

	public double getConsumptionBonus() {
		return consumptionBonus;
	}

	public void setConsumptionBonus(double consumptionBonus) {
		this.consumptionBonus = consumptionBonus;
	}

	public double getHillBonus() {
		return hillBonus;
	}

	public void setHillBonus(double hillBonus) {
		this.hillBonus = hillBonus;
	}

	public double getActualBonus() {
		return actualBonus;
	}

	public void setActualBonus(double actualBonus) {
		this.actualBonus = actualBonus;
	}

	public Date getBringTime() {
		return bringTime;
	}

	public void setBringTime(Date bringTime) {
		this.bringTime = bringTime;
	}
	
	
}
